﻿<!--#include file="h.asp"--><%
'
'	七色虎建站系统
'	会员帖子页面
'	2011.11.2

Sub main
	Dim id,userid,rs,sql,count,pagecount,page,i,pagesize,oddeven,pagenum,body_
	id=getN("id",0)
	userid=user_array(0)
	pagesize=10
	page=getN("page",1)
	hu.title = "用户帖子"
	body_ = checkMsg()'信息
	body_ = body_ & "[div=nav]-"&hu.url("?aid=index","首页")&"-"&hu.url("bbs_user.asp","会员中心")&"-用户帖子[/div]"
	If id=0 Or id=userid Then id=userid
	sql="select id,title,reply,hit from 74hu_topic where userid="&id
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.open sql, hu.db, 1, 1
	If Not rs.eof Then
		count = rs.recordcount
		body_ = body_ & "共"&count&"篇帖子<br/>"
		pagecount=(count+pagesize-1)\pagesize
		if page>pagecount then page=pagecount
		pagenum=pagesize*(page-1)*1
		rs.move(pagenum)
		For i=1 To PageSize
			If rs.eof Then Exit For
			oddeven=i Mod 2
			If oddeven=1 Then
				oddeven="odd"
			Else
				oddeven="even"
			End If
			body_ = body_ & "[div="&oddeven&"]"&(pagenum+i)&"."&hu.url("bbs_posts.asp?id="&rs("id"), noubb(rs("title"))) &"["& rs("reply") &"回 / "& rs("hit") &"阅][/div]"
			rs.movenext
		Next
		body_ = body_ & showPage("bbs_mypost.asp", "id:"&id, page, pagecount)
	Else
		body_ = body_ & "暂时没有帖子<br/>"
	End If
	rs.close
	Set rs=Nothing
	hu.body = comUbb(body_)
End Sub

%>